import { Home } from "../view/home.tsx";
import { Admin } from "../view/admin.tsx";
import { Navigate } from "react-router-dom";
import { User } from "@/view/user.tsx";
import { Settings } from "@/view/Settings.tsx";
import ChatRoom from "@/view/ChatRoom.tsx";
import Data from "@/view/Data.tsx";

export const routes = [
  {
    path: "/home",
    element: <Home />,
    children: [
      {
        path: "/home/user",
        element: <User />,
      },
      {
        path: "/home/settings",
        element: <Settings />,
      },
      {
        path: "/home/chatroom",
        element: <ChatRoom />,
      },
      {
        path: "/home/data",
        element: <Data />,
      },
    ],
  },
  {
    path: "/admin",
    element: <Admin />,
  },
  {
    path: "/",
    element: <Navigate to="/admin" />,
  },
];
